#!/bin/sh

# shellcheck disable=SC2024
echo '配置新增 hosts'

rm -f host_new_for_it

touch host_new_for_it

cp /etc/hosts host_new_for_it

echo '\n# 开发环境' >> host_new_for_it
echo '# 内部登录' >> host_new_for_it
echo '10.59.0.163 login-inner-dev.tongdun.cn' >> host_new_for_it
echo '# 采购系统' >> host_new_for_it
echo '10.59.6.221 ptp-dev.tongdun.cn' >> host_new_for_it
echo '# 10.59.6.221 ptp-demo-dev.tongdun.cn' >> host_new_for_it
echo '' >> host_new_for_it
echo '# 测试环境' >> host_new_for_it
echo '# 内部登录' >> host_new_for_it
echo '10.59.3.217 janus-inner.tongdun.cn' >> host_new_for_it
echo '# OA' >> host_new_for_it
echo '10.59.108.6 tdoa-test.tongdun.me' >> host_new_for_it


sudo chmod -R 777 /etc/hosts
sudo cat host_new_for_it > /etc/hosts
sudo killall -HUP mDNSResponder

rm -f host_new_for_it

# shellcheck disable=SC2028
echo '配置新增 hosts 完成'
